<extend name="Public/base" />
<block name="body" >
    <div class="main-title">
        <h2>{$product['id']?'编辑':'新增'}商品</h2>
    </div>

    <!---->
    <form action="{:U('Purchase/writepurchase')}" enctype="application/x-www-form-urlencoded" method="POST"
          class="form-horizontal" name="edit_product">
        <div class="form-item">
            <label for="purchase-proName" class="item-label">商品名称</label>
            <div class="controls">
                <input id="purchase-proName" type="text" name="proName" class="text input-large" value="{$purchase.proName}"/>
            </div>
            <!---->
        </div>
        <div class="form-item">
            <label for="purchase-head" class="item-label">商品规格</label>
            <div class="controls">
                <input id="purchase-head" type="text" name="head" class="text input-large" value="{$purchase.head}"/>头
            </div>
            <div class="controls">
                <input id="purchase-jin" type="text" name="jin" class="text input-large" value="{$purchase.jin}"/>斤
            </div>
        </div>
        <div class="form-item">
            <label for="purchase-number" class="item-label">商品数量</label>
            <div class="controls">
                <input id="purchase-number" type="text" name="number" class="text input-large" value="{$purchase.number}"/>
            </div>
        </div>
        <div class="form-item">
            <label for="purchase-shopName" class="item-label">商户</label>
            <div class="controls">
                <input id="purchase-shopName" type="text" name="shopName" class="text input-large" value="{$purchase.shopName}"/>
            </div>
        </div>
        <div class="form-item">
            <label for="purchase-oldPrice" class="item-label">往期采购价</label>
            <div class="controls">
                <input id="purchase-oldPrice" type="text" name="oldPrice" class="text input-large" value="{$purchase.oldPrice}"/>
            </div>
        </div>
        <div class="form-item">
            <input type="hidden" name="id" value="{$purchase.id}" />
            <button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal" >确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>
<block name="script">
    <script type="text/javascript" charset="utf-8">
        //导航高亮
        highlight_subnav('{:U('Purchase/purchaseapply')}');
    </script>
</block>